function(require, module, exports, window, document, frames, self, location, navigator, localStorage, history, Caches, screen, alert, confirm, prompt, XMLHttpRequest, WebSocket, Reporter, webkit, WeixinJSCore) {
    "use strict";
    function e(e, o) {
        if (! (e instanceof o)) throw new TypeError("Cannot call a class as a function")
    }
    function o(e, o) {
        if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return ! o || "object" != typeof o && "function" != typeof o ? e: o
    }
    function t(e, o) {
        if ("function" != typeof o && null !== o) throw new TypeError("Super expression must either be null or a function, not " + typeof o);
        e.prototype = Object.create(o && o.prototype, {
            constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0
            }
        }),
        o && (Object.setPrototypeOf ? Object.setPrototypeOf(e, o) : e.__proto__ = o)
    }
    var n = function() {
        function e(e, o) {
            for (var t = 0; t < o.length; t++) {
                var n = o[t];
                n.enumerable = n.enumerable || !1,
                n.configurable = !0,
                "value" in n && (n.writable = !0),
                Object.defineProperty(e, n.key, n)
            }
        }
        return function(o, t, n) {
            return t && e(o.prototype, t),
            n && e(o, n),
            o
        }
    } (),
    r = require("../../../../utils/base"),
    i = getApp(),
    a = require("../../../../utils/utils"),
    l = function(l) {
        function u() {
            return e(this, u),
            o(this, (u.__proto__ || Object.getPrototypeOf(u)).call(this))
        }
        return t(u, r.Base),
        n(u, [{
            key: "getCollctList",
            value: function(e, o) {
                var t = this;
                return new Promise(function(n) {
                    t.getReqResult("getCollectList", o).then(function(o) {
                        if ("fail" == o && n("fail"), "000000" == o.code) {
                            var r = o.a,
                            i = [];
                            if (0 != r.length) {
                                "reverse" == e && (r = r.reverse());
                                var a = {
                                    list: i = t.group(r, 10),
                                    num: r.length
                                };
                                n(a)
                            } else {
                                var l = {
                                    list: r,
                                    num: r.length
                                };
                                n(l)
                            }
                        }
                    })
                })
            }
        },
        {
            key: "getKickList",
            value: function(e, o) {
                var t = this;
                return new Promise(function(n) {
                    t.getReqResult("getKickList", o).then(function(o) {
                        if ("fail" == o && n("fail"), "000000" == o.code) {
                            var r = o.a,
                            i = [];
                            if (0 != r.length) {
                                "reverse" == e && (r = r.reverse());
                                var a = {
                                    list: i = t.group(r, 10),
                                    num: r.length
                                };
                                n(a)
                            } else {
                                var l = {
                                    list: r,
                                    num: r.length
                                };
                                n(l)
                            }
                        }
                    })
                })
            }
        },
        {
            key: "group",
            value: function(e, o) {
                for (var t = 0,
                n = []; t < e.length;) n.push(e.slice(t, t += o));
                return n
            }
        },
        {
            key: "cancelKick",
            value: function(e) {
                var o = this;
                return new Promise(function(t) {
                    o.getReqResult("cancelKick", e).then(function(e) {
                        t(e)
                    })
                })
            }
        },
        {
            key: "cancelCollect",
            value: function(e) {
                var o = this;
                return new Promise(function(t) {
                    o.getReqResult("cancelCollect", e).then(function(e) {
                        t(e)
                    })
                })
            }
        },
        {
            key: "getWordDetail",
            value: function(e) {
                var o = this;
                return new Promise(function(t) {
                    wx.getStorage({
                        key: e.toString(),
                        success: function(e) {
                            t(e.data)
                        },
                        fail: function(n) {
                            var r = "/bookmanage/wordplus/" + i.globalData.bookId + "/" + e + ".txt";
                            o.getCDNFile(r).then(function(n) {
                                if ("fail" == n) t("fail");
                                else {
                                    var r = JSON.parse(n.data);
                                    wx.setStorage({
                                        data: o.dealWordDetail(r),
                                        key: e.toString()
                                    }),
                                    t(o.dealWordDetail(r))
                                }
                            })
                        }
                    })
                })
            }
        },
        {
            key: "dealWordDetail",
            value: function(e) {
                if (e.bookWordInfo.bookWordExamples) for (o = 0; o < e.bookWordInfo.bookWordExamples.length; o++) e.bookWordInfo.bookWordExamples[o].enSentences = a.findWord(e.bookWordInfo.bookWordExamples[o].enSentences, e.bookWordInfo.wordName);
                if (e.bookWordInfo.bookWordExams) for (var o = 0; o < e.bookWordInfo.bookWordExams.length; o++) e.bookWordInfo.bookWordExams[o].enSentences = a.findWord(e.bookWordInfo.bookWordExams[o].enSentences, e.bookWordInfo.wordName);
                return e.bookWordInfo.bookWordMnemonics && (e.bookWordInfo.bookWordMnemonics = a.dealMemory(e.bookWordInfo.bookWordMnemonics, e.bookWordInfo.wordName)),
                e
            }
        }]),
        u
    } ();
    module.exports = {
        Wordlist: l
    };
}